In GCC it's valid to write ...
__asm__ ("mov %%fs:0x18, %0" : "=r" (ret) : );
...while TCC didn't accept it because of the empty input registers.
--- tccasm.c Sat Jun 18 00:09:15 2005
+++ tccasm.c Sun Jul 3 17:18:46 2005
@@ -916,21 +916,23 @@
nb_outputs = nb_operands;
if (tok == ':') {
next();
- /* input args */
- parse_asm_operands(operands, &nb_operands, 0);
- if (tok == ':') {
- /* clobber list */
- /* XXX: handle registers */
- next();
- for(;;) {
- if (tok != TOK_STR)
- expect("string constant");
- asm_clobber(clobber_regs, tokc.cstr->data);
+ if (tok != ')') {
+ /* input args */
+ parse_asm_operands(operands, &nb_operands, 0);
+ if (tok == ':') {
+ /* clobber list */
+ /* XXX: handle registers */
next();
- if (tok == ',') {
+ for(;;) {
+ if (tok != TOK_STR)
+ expect("string constant");
+ asm_clobber(clobber_regs, tokc.cstr->data);
next();
- } else {
- break;
+ if (tok == ',') {
+ next();
+ } else {
+ break;
+ }
}
}
}
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel