FAQ

Search Discussions

  • Ian Lance Taylor at Sep 20, 2012 at 12:50 am

    On Wed, Sep 19, 2012 at 5:38 PM, wrote:
    I can't view some of the files in codereview:

    https://codereview.appspot.com/6530047/diff/5001/src/cmd/5a/y.tab.c
    gives me "Can't parse the patch to chunks".

    https://codereview.appspot.com/6530047/diff/5001/src/cmd/6a/y.tab.c and
    https://codereview.appspot.com/6530047/diff/5001/src/cmd/8a/y.tab.c give
    me "Bad content. Try to upload again."

    Borked for all or just me?
    Doesn't work for me either, but it doesn't matter, as those are generated files.

    Ian
  • Nigeltao at Sep 20, 2012 at 1:51 am
    https://codereview.appspot.com/6530047/diff/5001/src/cmd/6a/lex.c
    File src/cmd/6a/lex.c (right):

    https://codereview.appspot.com/6530047/diff/5001/src/cmd/6a/lex.c#newcode174
    src/cmd/6a/lex.c:174: #define CVT(x, y) ((x)<<8 | (y))
    s/x, y/f, t/ to match 6a and 8a?

    https://codereview.appspot.com/6530047/diff/5001/src/cmd/6a/lex.c#newcode432
    src/cmd/6a/lex.c:432: "JB", LTYPER, AJCS, 1, /* alternate */
    Does this have an opsize of 1 just because the name ends in "B"?

    https://codereview.appspot.com/6530047/diff/5001/src/cmd/6a/lex.c#newcode720
    src/cmd/6a/lex.c:720: "FMOVB", LTYPE3, AFMOVB, 1,
    Is 6a's FMOV what other x86 assemblers call FLD/FST?

    https://codereview.appspot.com/6530047/diff/5001/src/cmd/6a/lex.c#newcode1217
    src/cmd/6a/lex.c:1217: yyerror("%s expects src size=%d but have src
    size=%d", anames[a], tosize, g2->to.opsize);
    s/src/dst/g and similarly for 5a and 8a.

    https://codereview.appspot.com/6530047/diff/5001/src/cmd/cc/gotypebody
    File src/cmd/cc/gotypebody (right):

    https://codereview.appspot.com/6530047/diff/5001/src/cmd/cc/gotypebody#newcode150
    src/cmd/cc/gotypebody:150: s = strdup(skip(s));
    Out of curiousity, is the strdup unnecessary? Just a defensive habit?

    https://codereview.appspot.com/6530047/diff/5001/src/cmd/cc/gotypebody#newcode283
    src/cmd/cc/gotypebody:283: return '0' <= c && c <= '9' || 'a' <= c && c
    <= 'z' || 'A' <= c && c <= 'Z' || c >= 0x80;
    Underscore?

    https://codereview.appspot.com/6530047/diff/5001/src/cmd/cc/gotypebody#newcode323
    src/cmd/cc/gotypebody:323: yyerror("syntax error in TYPE: missing open [
    in map type");
    Isn't "map" a shorthand for "map[T]U"?

    https://codereview.appspot.com/6530047/
  • R at Sep 20, 2012 at 6:17 am
    The spec (to use a generous term) for this feature is vague. For an
    assembler already abysmally documented, this isn't helping.

    Also I worry about where this will lead. It marks a profound change in
    direction for the assembler, moving it from a pure text->.6 converter
    into something with pretty deep knowledge about Go.

    I'm not saying "no", I'm just clearing my throat.


    http://codereview.appspot.com/6530047/
  • Russ Cox at Sep 20, 2012 at 7:59 pm

    On Thu, Sep 20, 2012 at 2:17 AM, wrote:
    The spec (to use a generous term) for this feature is vague. For an
    assembler already abysmally documented, this isn't helping.
    Are there specific things you'd like to me add or questions you'd like
    me to answer in
    http://codereview.appspot.com/6530047/diff/5001/src/cmd/6a/doc.go?
    Also I worry about where this will lead. It marks a profound change in
    direction for the assembler, moving it from a pure text->.6 converter
    into something with pretty deep knowledge about Go.
    It does, yes. Maybe not pretty deep but definitely knowledge.

    Russ
  • Nigel Tao at Sep 20, 2012 at 11:31 pm

    On 21 September 2012 05:30, Russ Cox wrote:
    Also I worry about where this will lead. It marks a profound change in
    direction for the assembler, moving it from a pure text->.6 converter
    into something with pretty deep knowledge about Go.
    It does, yes. Maybe not pretty deep but definitely knowledge.
    Thinking out loud, could you write the func as a comment that a
    vet-like tool outside of 5a/6a/8a could check? You'd have to manually
    update the offsets (although the tool could be fix-like in updating
    them), but you have to do some manual work anyway since we have MOVL
    and MOVQ but not MOV.

    // TYPE "func(x []byte, b byte) (ret int)"
    TEXT ·IndexByte(SB),7,$0
    MOVQ x_ptr+0(FP), SI
    MOVL x_len+8(FP), BX
    MOVB b+16(FP), AL
    MOVQ SI, DI
    // etc
  • Brad Fitzpatrick at Sep 20, 2012 at 11:44 pm

    On Thu, Sep 20, 2012 at 4:31 PM, Nigel Tao wrote:
    On 21 September 2012 05:30, Russ Cox wrote:
    Also I worry about where this will lead. It marks a profound change in
    direction for the assembler, moving it from a pure text->.6 converter
    into something with pretty deep knowledge about Go.
    It does, yes. Maybe not pretty deep but definitely knowledge.
    Thinking out loud, could you write the func as a comment that a
    vet-like tool outside of 5a/6a/8a could check?
    Do [568]a have aspirations of being (or remaining) generic linkers for
    multiple languages?

    I thought they were already forked to be Go's.
  • Russ Cox at Sep 21, 2012 at 4:13 am
    Never mind, I will try something else.
  • Russ Cox at Sep 21, 2012 at 4:39 am

    Thinking out loud, could you write the func as a comment that a
    vet-like tool outside of 5a/6a/8a could check? You'd have to manually
    update the offsets (although the tool could be fix-like in updating
    them), but you have to do some manual work anyway since we have MOVL
    and MOVQ but not MOV.
    The int change is not that hard and requires editing source files by
    hand regardless of what we do here. I was trying to avoid assembly
    changes for pure alignment changes (two are planned). Instead I have
    written a tool to check the assembly against the Go declarations. When
    it comes time to do the alignment changes I will make the program
    apply the updates. I don't expect this to be a general tool we
    advertise.

    Russ
  • Rsc at Sep 21, 2012 at 4:16 am

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedSep 20, '12 at 12:38a
activeSep 21, '12 at 4:39a
posts10
users5
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase