[Top][All Lists]

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

[Tinycc-devel] ll-bitfield test on i386-linux

From: Michael Matz
Subject: [Tinycc-devel] ll-bitfield test on i386-linux
Date: Sun, 7 May 2017 22:28:46 +0200 (CEST)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hello grischka,

parts of your last patch:

    * tcctest.c: remove outdated limitation for ll-bitfield test
      It always worked, there is no reason why it should not work
      in future.

That's not true.  The comment I've put there tried to explain it:

-#ifndef __i386__
-    /* on i386 we don't correctly support long long bit-fields.
-       The bitfields can straddle long long boundaries (at least with
-       GCC bitfield layout) and code generation isn't prepared for this
-       (would have to work with two words in that case).  */
-    /* bit sizes below must be bigger than 32 since GCC doesn't allow
-       long-long bitfields whose size is not bigger than int */

Note the reference to GCC bitfield layout. That (or PCC layout if you will) makes it so that the code generation of TCC can't cope with it (and never could). That's the default on linux systems (not on windows, though), so accordingly the test is now broken:

--- test.ref    2017-05-07 22:18:06.000000000 +0200
+++ test.out3   2017-05-07 22:18:06.000000000 +0200
@@ -378,7 +378,7 @@
 121 121
 st1.f1 == -1
 st1.f2 == -1
-4886718345 4026531841 120
+4886718345 4157519691776 536871032

Note, only on i386-linux (on windows and x86-64 it works). Let me know if I should just reinstate the ifdef or amend it with "&& defined(__linux__)". It's not so superlikely that I come around fixing code generation for this case until release of 0.9.27 (or at all, my interest in i386 is not very pronounced :) ).


reply via email to

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