Marek Surovič via llvm-dev
2015-Aug-17 13:47 UTC
[llvm-dev] Support for byte sizes larger than 8 bits
Hello LLVMdev, lately the company I work for has bumped into a need for a way to specify a size of byte larger than the regular 8 bits for our targets. After a bit of research we found out that the feature would require changes across most of the LLVM framework (including clang) and maintaining such changes without involving the LLVM devs would be tedious to say the least. So my first question would be if such a feature would be welcome in the LLVM framework. The motivation for implementing the feature is that certain embedded processors often use custom byte sizes, such as 12 bits, to conserve power while addressing its memory. The first solution sketch we came up with is to introduce a new field into the data layout string that would specify the size of a byte (or char). The default value of the field would be the regular 8 bits. This way, the information should be propagated through all the necessary parts of LLVM. The second issue is how to find and modify the existing code that relies on the assumption that a byte (or char) in the target is always 8 bits. The changes we would introduce, should the feature be accepted, would of course be tested against an existing LLVM target and test-suites to ensure that we didn't break anything. Regards, Marek Surovic -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150817/9c95b076/attachment.html>
Patrik Hägglund H via llvm-dev
2015-Aug-18 10:51 UTC
[llvm-dev] Support for byte sizes larger than 8 bits
We maintain a set of patches, supporting 16-bit bytes for LLVM (currently not Clang), which may be provided upon request. /Patrik Hägglund From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Marek Surovic via llvm-dev Sent: den 17 augusti 2015 15:48 To: llvm-dev at lists.llvm.org Subject: [llvm-dev] Support for byte sizes larger than 8 bits Hello LLVMdev, lately the company I work for has bumped into a need for a way to specify a size of byte larger than the regular 8 bits for our targets. After a bit of research we found out that the feature would require changes across most of the LLVM framework (including clang) and maintaining such changes without involving the LLVM devs would be tedious to say the least. So my first question would be if such a feature would be welcome in the LLVM framework. The motivation for implementing the feature is that certain embedded processors often use custom byte sizes, such as 12 bits, to conserve power while addressing its memory. The first solution sketch we came up with is to introduce a new field into the data layout string that would specify the size of a byte (or char). The default value of the field would be the regular 8 bits. This way, the information should be propagated through all the necessary parts of LLVM. The second issue is how to find and modify the existing code that relies on the assumption that a byte (or char) in the target is always 8 bits. The changes we would introduce, should the feature be accepted, would of course be tested against an existing LLVM target and test-suites to ensure that we didn't break anything. Regards, Marek Surovic -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150818/6325c8c8/attachment.html>