tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] tcc grammar problems


From: jiang
Subject: Re: [Tinycc-devel] tcc grammar problems
Date: Fri, 01 Aug 2014 23:10:26 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

I would like you to explain my patch.
I vstore () in bitfield values ​​on the right match, with gen_cast (dt) to achieve.
For example;
struct st {int a: 16; int b: 16} s;
s.a = 55;
Calculation process, with sa (left) Type 55 (right value) match, to call gen_cast (dt)
Complete the following calculations.
55 & 0xff
Next bit_pos and bit_size matching operation, complete vstore () in.

In vstore () in ret, cc, gen_ctrl, is played to optimize the size of the effect.
For example:
s.a = 55; // ret = 0, gv_dup () does not call
sb = sa = 55 // calculated to s.a time, ret = 1, gv_dup () call.
//Calculate when to s.b, ret = 0, gv_dup () does not call

There are the following cases:
int ii = sb = sa = 55; // need to use gen_ctrl, because ii initialization, there is a return value, see init_putv ()

Another is:
gen_cast () has been added
tcc_warning ("overflow in implicit constant conversion");
tcc_warning("large integer implicitly truncated to unsigned type");

The meaning is very simple patch

Jiang



reply via email to

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