Sunshine (she/her)@piefed.ca to Linux@programming.devEnglish · 26 days agoLinus Torvalds Rejects RISC-V Changes For Linux 6.17: "Garbage"www.phoronix.comexternal-linkmessage-square44linkfedilinkarrow-up1154arrow-down17 cross-posted to: linux@lemmy.zip
arrow-up1147arrow-down1external-linkLinus Torvalds Rejects RISC-V Changes For Linux 6.17: "Garbage"www.phoronix.comSunshine (she/her)@piefed.ca to Linux@programming.devEnglish · 26 days agomessage-square44linkfedilink cross-posted to: linux@lemmy.zip
minus-squareFizzyOrange@programming.devlinkfedilinkarrow-up3arrow-down3·26 days ago this is about non-generic code in generic header. (a << 16) | b is about the most generic code you can get. How is that remotely RISC-V specific?
minus-squarezygo_histo_morpheus@programming.devlinkfedilinkarrow-up11·edit-225 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·26 days agoWhat makes you think it’s making a pointer? Nobody said anything about that.
minus-squarezygo_histo_morpheus@programming.devlinkfedilinkarrow-up2·26 days agoOh my bad I don’t know where I got that from lol
minus-squareFizzyOrange@programming.devlinkfedilinkarrow-up3·26 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.
(a << 16) | b
is about the most generic code you can get. How is that remotely RISC-V specific?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.