<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 04/03/2014 03:31 PM, Jeroen
Dobbelaere wrote:<br>
</div>
<blockquote
cite="mid:CACpz31SfdoCpWZOeBrK1hs9fzJjtuv-F5nXOviijLh_wrgCZ4g@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi,<br>
<br>
</div>
I am trying to get llvm working for an architecture that
has 64bit registers, but 32bit addresses.<br>
</div>
Because of that, I want the pointers to also be 32bit,
although they will live in a 64 bit register.<br>
<br>
</div>
<div>On the frontend, I do not encounter any issues, but when
I provide a<br>
...<br>
"p:32:32:32"<br>
...<br>
</div>
<div>DataLayout specification to the backend, things get ugly:<br>
</div>
<div>- SelectionDag is producing a mix of 64bit and 32bit
nodes, and it seems that a number of<br>
necessary legalizations/promotions are missing.<br>
<br>
</div>
<div>After adding support for
'PromoteIntRes_GlobalAddress(...)', I get a failure, because
a 'store' node now has a mix of operands:<br>
</div>
<div>
- some of the operands were already 'i64' from the
beginning,<br>
</div>
<div>- others were 'i32' (due to the 32bit pointers) and have
been promoted to 'i64'<br>
<br>
</div>
<div>Because of the latter, the 'PromoteIntOp_STORE' is
called. This uses 'GetPromotedInteger' to access the
operands.<br>
</div>
<div>But, GetPromotedInteger fails if the operand was not
promoted. So it fails on the operands of the 'store' that
were already legal (i64).<br>
<br>
</div>
<div>What would be the recommended way to fix this ?<br>
</div>
<div>(Or did I miss something, and should 32bit pointers on a
64bit architecture be done in a completely different way)<br>
</div>
<br>
</div>
</div>
</blockquote>
How are you implementing GlobalAddress?<br>
<br>
R600/SI has both 32-bit and 64-bit pointers, and (sort of) 64-bit
registers if you want to see how it handles it.<br>
</body>
</html>