<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<font style="font-size: 10pt;" size="2">Hello,</font><font style="font-size: 10pt;" size="2"><br></font><font style="font-size: 10pt;" size="2"><br></font><font style="font-size: 10pt;" size="2">I am working on a target with native 16-bit units addressing.So, for a a[1] reference a a+1 expression should be generated for an i16.</font><font style="font-size: 10pt;" size="2"><br></font><font style="font-size: 10pt;" size="2"><br></font><font style="font-size: 10pt;" size="2">I found this issue discussed  before:</font><font style="font-size: 10pt;" size="2"><br></font><br><pre><i>From gohman at apple.com  Wed Apr  1 12:37:16 2009<br>From: gohman at apple.com (Dan Gohman)<br>Date: Wed, 1 Apr 2009 10:37:16 -0700<br>Subject: [LLVMdev] adjust address calculus for an architecture that does<br>      not address bytes<br>In-Reply-To: <57C38DA176A0A34A9B9F3CCCE33D3C4AFA7EFF5E0B@FRPAR1CL009.coe.adi.dibcom.com><br>References: <57C38DA176A0A34A9B9F3CCCE33D3C4AFA7EFF5E0A@FRPAR1CL009.coe.adi.dibcom.com><br>      <49D26D79.6080109@xmos.com><br>     <57C38DA176A0A34A9B9F3CCCE33D3C4AFA7EFF5E0B@FRPAR1CL009.coe.adi.dibcom.com><br>Message-ID: <A1A0F5A3-1736-4DF0-8468-103A236759FF@apple.com><br><br>...<br>(8-bit) byte addressibility is a fairly widespread assumption in LLVM,<br>reaching beyond just GEP lowering.  Fixing this will require more<br>work than just adding a subclass, though it ought to be doable.<br><br>Go through the TargetData class and generalize anything that works<br>in terms of bytes to work in terms of address units.  I think you'll  <br>need<br>to extend the datalayout string syntax to support an address unit<br>size (in bits), and to add an address unit size field to the TargetData<br>class.  You'll also need to change APIs like getSizeInBytes to<br>getSizeInAddressUnits.<br><br>Then, you can change your target datalayout string to be in terms of<br>16-bit address units instead of 8-bit address units.<br><br>Then there are other places in LLVM which hardcode "8" constants<br>and "i8*" types; these can be fixed once the TargetData changes are<br>in place.<br><br>Dan<br><br><br></i>I would like to get the current status on this topic. Has anyone tried to implement this yet?<br><br>thanks,<br><br>Jonas<br><br></pre><br>                                          </body>
</html>