Re: [PATCH v2] implement constant-folding in __builtin_bswap*()

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

 



On Thu, Nov 24, 2016 at 4:48 AM, Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:
> There is a problem though, with non-constant args.
> Now the predeclarations of the 3 __builtin_bswap16/32/64
> are gone, no more prototype and thus no more typing information.
>
> For example, if you call __builtin_bswap64() with an int argument,
> there is no way for the next steps to know the arg must first
> be 64 bit extended. Same for the result's type.

That is a very good point. Need more work on that.

The currently problem if I include the function prototype, the
function prototype symbol will over shadow the symbol contain
swap_op. We need to make sure the function prototype symbol
is the one loading with correct swap_op.

Ideally, all the "__builtin_xxx" related stuff should be move to a
separate builtin.c. Right now the function prototype is in lib.c
The implementation is sprinkle around symbol.c, evaluation.c
and expand.c.

Re-attach the V2 patch as last email I forget to CC sparse
mailing list. This V2 patch still have the missing prototype problem
you describe here.


Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux