tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Alignment issue


From: Daniel Fiala
Subject: [Tinycc-devel] Alignment issue
Date: Mon, 22 Sep 2014 07:50:33 +0200
User-agent: Zoho Mail

Hello.
It seems that alignment in tcc is not working properly. I tried following program:

#include <stdio.h>

static float x[4] = { 1, 2, 3, 4 };
static float y[4] __attribute__((aligned(32))) = { 4, 5, 6, 7 };

int
main(void) {
        fprintf(stderr, "%p\n", x);
        fprintf(stderr, "%p\n", y);

        return 0;
}

I compiled it with tcc 0.9.5 under Ubuntu 14.04 and I got following output:

0x8049544
0x8049554

It looks that address is not aligned. :-(

Alignment to 32bytes is useful for AVX development.

Regards,
Daniel Fiala

reply via email to

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