[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2
From: |
robotux |
Subject: |
Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2 |
Date: |
Thu, 15 Nov 2012 16:29:52 +0100 |
User-agent: |
Roundcube Webmail/0.5.3 |
On Thu, 15 Nov 2012 16:12:17 +0100, grischka wrote:
[SNIP]
Well, why not. It doesn't cover yet consequent pass-trough of the
AttributeDef but it could be a step in the right direction.
Good, I did it in the mean time.
I'd suggest changing
static void put_got_offset(TCCState *s1, int index, unsigned long
val);
into a more general
static struct sym_attribute *get_sym_attribute(TCCState *s1, int
index);
which would expand the array with an empty entry if needed.
Thus the currently single instance of usage
put_got_offset(s1, sym_index, s1->got->data_offset);
would become
get_sym_attribute(s1, sym_index)->got_offset =
s1->got->data_offset;
I already did a general function to store a value but I adopted a
different approach:
#define put_sym_attr(s,index,field,val) \
alloc_sym_attr(s, index); \
s->sym_attrs[index].field = val
where alloc_sym_attr is the old put_got_offset without the assignment
line at the end. See attached file for the full patch (only tested on
x86-64 so far, I'll try to compile it on arm later).
If this is not fine for you, I'll change it happily.
Anyway, just my 2 cents of completely untested suggestions. ;)
--- grischka
Thomas
Generate-PLT-Thumb-stub-only-when-necessary.patch
Description: Text Data
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, (continued)
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, Thomas Preud'homme, 2012/11/06
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, Milutin Jovanović, 2012/11/07
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, Thomas Preud'homme, 2012/11/07
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, Daniel Glöckner, 2012/11/10
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, Thomas Preud'homme, 2012/11/10
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, Thomas Preud'homme, 2012/11/10
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, robotux, 2012/11/15
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, grischka, 2012/11/15
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, robotux, 2012/11/15
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, grischka, 2012/11/15
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2,
robotux <=
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, grischka, 2012/11/15
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, Thomas Preud'homme, 2012/11/16
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, Thomas Preud'homme, 2012/11/16
- Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2, grischka, 2012/11/17