Re: Interaction between bitfields and casts

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

 



On Wed, Aug 9, 2017 at 11:27 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> So the OP_*CAST functions really are a bit confused. Maybe Luc has
> cleaned some of it up already, I'm going partly from memory.

I have but I never posted it yet.
Basically, I have specialized them:
- TRUNC, ZEXT & SEXT: truncate (may be not neede), zero & sign extend
for integers
- PTRU & UPTR: conversion pointer from/to unsigned integer (not sure
it's needed)
- FCVTU & FCVTS: convert float to unsigned/signed integers
- UCVTF & SCVTF: convert int to float
- FCVTF: float to float convert (maybe even better/simpler with FTRUNC
& FEXT ?à)

The main objective being to make things more explicit a avoid to have
to test the orig-type at each time.

-- Luc
--
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