Displaying 3 results from an estimated 3 matches for "0xhighlow".
2019 Jul 09
2
Manipulating global address inside GlobalAddress SDNode in (RISCV) LLVM backend
...019-June/132805.html
To pass the legalizer we plan to break the 64 bit GlobalAddress into 32 bit
GlobalAddress having the other 32 bit glued to the node. We could not find
a direct way to convert the 64 bit GlobalAddress Node into a 32 bit node.
For a GlobalAddress node say i64 = GlobalAddress<0xHighLow> we want to
convert it into i32 = GlobalAddress<0xLow>.
[The below part is in reference with the RISCV LLVM backend]
If there is no direct way to do this, we plan to fall back on a backup plan
to convert the GlobalAddress node into the required LUI and ADDI pair but
that would require the...
2019 Jul 11
2
Manipulating global address inside GlobalAddress SDNode in (RISCV) LLVM backend
...e trying
to break the 64 bit address from GlobalAddress node into two i32 register.
We will add custom load/store which will generate the address using values
from two registers. We thought LUI and ADDI pair will be good to store the
values in a i32 register. If we could transform GlobalAddress<0xHighLow>
directly to GlobalAddress<0xLow>, we could use the present RISCVII::MO_HI
and MO_LO as they only exact the 32 high bits. What do you think?
Many thanks for your reply :)
On Tue, Jul 9, 2019 at 9:41 PM Tim Northover <t.p.northover at gmail.com>
wrote:
> On Tue, 9 Jul 2019 at 14:...
2019 Jul 11
2
Manipulating global address inside GlobalAddress SDNode in (RISCV) LLVM backend
...pointer you'd need 4 instructions:
>
> lui rLO32, addr:MO_LO32_LO
> addi rLO32, rLO32, addr:MO_LO32_HI
> lui rHI32, addr:MO_HI32_LO
> addi rHI32, rLO32, addr:MO_LO32_HI
>
> or some variation for PIC etc.
>
> > If we could transform GlobalAddress<0xHighLow> directly to
> GlobalAddress<0xLow>, we could use the present RISCVII::MO_HI and MO_LO as
> they only exact the 32 high bits. What do you think?
>
> I still recommend against reusing GlobalAddress as-is with an i32
> type, but that's probably a minor detail. The only way...