tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] .fill .rept broken by "Clean up 64bit immediate suppo


From: matz
Subject: Re: [Tinycc-devel] .fill .rept broken by "Clean up 64bit immediate support"
Date: Sat, 14 May 2016 05:11:26 +0200 (CEST)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

Hello,

[Sorry if you get this multiple times, the eggs.gnu.org mail server currently has issues accepting mails from my normal provider]

On Fri, 13 May 2016, Sergey Korshunoff wrote:

> Is this change must be for x86_64 only?

Well, strictly speaking 64bit immediates are x86-64 only of course, but the change is in common code. I merely typoed the recognition of signed constants.

I reverted this patch in my github repo.
https://github.com/seyko2/tinycc/commit/e5250b8d5fc8782dcf5eaa9681d5111a223d9e69
It breaks cmany things: .rept, .fill, "and $-16, %rax"

I've fixed that in mob and added instruction tests for the above cases to asmtest. But I haven't seen any breakage in .rept/.fill . If you still see one I need a reproducer.

Also
https://github.com/seyko2/tinycc/commit/74dcf589d7b2d67a3d0642a8ea56aa25c93f573a
[fix, cross] lib/* includes
   There was errors in cross-compilation mode on i386:
   ../x86_64-tcc -B.. -c libtcc1.c
      error: incompatible redefinition of 'intptr_t'
   ../x86_64-tcc -B.. -c bcheck.c
      error: incompatible redefinition of 'ssize_t'

No, this is wrong. You work around a problem in your installed libc headers, or an incompatibility between those headers and TCCs stddef.h one. (And why you remove unistd.h I don't know). You need to identify the problem and fix it correctly. Start by finding out what your libc headers define those two types to. ssize_t should be defined in several headers, stdio.h and sys/types.h. intptr_t should be defined in intptr_t.

Tell us what the definitions look like, then we can think about how to make the tcc stddef.h definitions not be incompatible.

It might also simply be that your libc headers are incompatible with a 64bit compilation (e.g. if you miss any WORDSIZE support from <bits/wordsize.h>). In that case we might have to do more hackery, but generally it won't be possible on such a system to build much software cross (to 64bit) at all.


Ciao,
Michael.



reply via email to

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