[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] alinged/unaligned on OpenBSD
From: |
grischka |
Subject: |
Re: [Tinycc-devel] alinged/unaligned on OpenBSD |
Date: |
Mon, 25 Jan 2021 18:55:05 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (Windows/20090812) |
Herman ten Brugge via Tinycc-devel wrote:
The problem is that packed structeres should probably always use
single_byte code.
For example:
-----
struct __attribute__((packed)) {
char a;
int b;
} s;
int
main(void)
{
s.b = 3;
}
-----
Also fails to run on arm32 (openbsd).
I do not have a solution. But maybe Grischka can solve this?
Don't know, maybe look what gcc does?
However, with your example, for example, one could take the address
int *p = &s.b;
and pass that to other functions, as well. There is not much
that the compiler could do.
For the 96_nodata_wanted test using 'packed' or not probably would
not make much difference, at least on ARM. Maybe it was supposed
to test single-byte access under code suppression. But why shouldn't
it work anyway.
--- grischka
Herman
- [Tinycc-devel] alinged/unaligned on OpenBSD, Christian Jullien, 2021/01/25
- Re: [Tinycc-devel] alinged/unaligned on OpenBSD, Herman ten Brugge, 2021/01/25
- Re: [Tinycc-devel] alinged/unaligned on OpenBSD,
grischka <=
- Re: [Tinycc-devel] alinged/unaligned on OpenBSD, Herman ten Brugge, 2021/01/25
- Re: [Tinycc-devel] alinged/unaligned on OpenBSD, Herman ten Brugge, 2021/01/27
- Re: [Tinycc-devel] alinged/unaligned on OpenBSD, grischka, 2021/01/28
- Re: [Tinycc-devel] alinged/unaligned on OpenBSD, Herman ten Brugge, 2021/01/31
- Re: [Tinycc-devel] alinged/unaligned on OpenBSD, grischka, 2021/01/31