tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] GAS symbols


From: Sergey Korshunoff
Subject: Re: [Tinycc-devel] GAS symbols
Date: Thu, 31 Mar 2016 08:32:01 +0300

> Is this change works (with your patch reverted)?
Sorry, wrong change, original code is correct


2016-03-31 8:26 GMT+03:00 Sergey Korshunoff <address@hidden>:
> The original problem with the '.' is GAS was that tcc couldn't deal with labels
> starting '.'

Is this change works (with your patch reverted)?

    case '.':
        /* special dot handling because it can also start a number */
        PEEKC(c, p);
        if (isnum(c)) {
            cstr_reset(&tokcstr);
            cstr_ccat(&tokcstr, '.');
            goto parse_num;
-        } else if ((isidnum_table['.' - CH_EOF] & IS_ID) != 0) { /* asm mode */
+       } else if (parse_flags & PARSE_FLAG_ASM_FILE) { /* asm mode */
            *--p = c = '.';
            goto parse_ident_fast;


Another qiestion: what purpose of the following change?

                if (tok != TOK_STR)
                     expect("string constant");
                 next();
+                if (tok == ',') {
+                    next();
+                    if (tok == '@' || tok == '%')
+                        next();
+                    next();
+                }
             }
             last_text_section = cur_text_section;
             use_section(s1, sname);
         }
         break;

> f you do revert this change, please add a test for the SRC(y...) that passes on mob branch.

Not so simple: a file must be a *.S and makefile changes needed



2016-03-31 1:09 GMT+03:00 Vladimir Vissoultchev <address@hidden>:
The original problem with the '.' is GAS was that tcc couldn't deal with labels starting '.' like

.start:
      <<code here>>
.end:

. . . and gcc -S seem to produce lots of these.

Unfortunately there is no failing test for this yet implemented so your revert seems to pass all tests present.

If you do revert this change, please add a test for the SRC(y...) that passes on mob branch.

cheers,
</wqw>

-----Original Message-----
From: tinycc-devel-bounces+wqweto=address@hidden [mailto:tinycc-devel-bounces+wqweto=address@hidden] On Behalf Of Sergey Korshunoff
Sent: Wednesday, March 30, 2016 11:54 PM
To: address@hidden
Subject: Re: [Tinycc-devel] GAS symbols

> First version of the patch is attached. Please test.
Don't works. I want to reverse '.' in asm indentifers. A patch attached,


_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]