<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-text-html" lang="x-unicode">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-unicode">Hello LLVMdev,<br>
<br>
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. <br>
<br>
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. <br>
<br>
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. <br>
<br>
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. <br>
<br>
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. <br>
<br>
Regards, <br>
<br>
Marek Surovic <br>
</div>
</div>
</body>
</html>