[Top][All Lists]

[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)


[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.
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.

[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.


reply via email to

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