Sunshine@piefed.ca to Linux@programming.devEnglish · 5 days agoLinus Torvalds Rejects RISC-V Changes For Linux 6.17: "Garbage"www.phoronix.comexternal-linkmessage-square42fedilinkarrow-up1146arrow-down17
arrow-up1139arrow-down1external-linkLinus Torvalds Rejects RISC-V Changes For Linux 6.17: "Garbage"www.phoronix.comSunshine@piefed.ca to Linux@programming.devEnglish · 5 days agomessage-square42fedilink
minus-squarezygo_histo_morpheus@programming.devlinkfedilinkarrow-up11·edit-24 days agoMaking a u32 pointer from two u16’s isn’t a generic operation because it has to make assumptions about how the pointers work endianess Edit: Actually, I’m wrong, didn’t think this through properly. See the replies
minus-squareFizzyOrange@programming.devlinkfedilinkarrow-up2·4 days agoWhat makes you think it’s making a pointer? Nobody said anything about that.
minus-squarezygo_histo_morpheus@programming.devlinkfedilinkarrow-up2·4 days agoOh my bad I don’t know where I got that from lol
minus-squareFizzyOrange@programming.devlinkfedilinkarrow-up3·4 days agoNw. You’re also wrong about endianness. This function would be written exactly the same irrespective of endianness: uint32_t u16_high_low_to_u32(uint16_t high, uint16_t low) { return (high << 16) | low; } That is endian agnostic.
Making a u32
pointerfrom two u16’s isn’t a generic operation because it has to make assumptions abouthow the pointers workendianessEdit: Actually, I’m wrong, didn’t think this through properly. See the replies
What makes you think it’s making a pointer? Nobody said anything about that.
Oh my bad I don’t know where I got that from lol
Nw. You’re also wrong about endianness. This function would be written exactly the same irrespective of endianness:
uint32_t u16_high_low_to_u32(uint16_t high, uint16_t low) { return (high << 16) | low; }
That is endian agnostic.