[llvm-commits] Fixing Bug 13662: paired register for inline asm with 64-bit data on ARM
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Oct 3 14:46:22 PDT 2012
On Oct 3, 2012, at 11:30 AM, Weiming Zhao <weimingz at codeaurora.org> wrote:
> I implemented a GPRPair with "untyped".
> However, during building DAG, (SelectionDAGBuilder::visitInlineASM), when
> it tries to do getCopyFromRegs, it fails.
> This is because RegisterVT is unknow, so it cannot match with value type.
> And after the unknow type or i64 propagates, more places need to be
> repaired/specially treated.
Hi Weiming,
When passing an i64 value to inline asm with this constraint, the DAG should go like this:
%pair<untyped> = REG_SEQUENCE GPRPair, %val0<i32>, gsub0, %val1<i32>, gsub1
INLINEASM %pair<untyped>
Here, %val0 and %val1 are the legalized parts of the original i64 value.
Similarly, when returning a value like that from inline asm:
%pair<untyped> = INLINEASM
%val0<i32> = EXTRACT_SUBREG %pair<untyped>, gsub0
%val1<i32> = EXTRACT_SUBREG %pair<untyped>, gsub1
It would be great if this could happen in target independent code, but it is possible you have to do it in the target code.
/jakob
More information about the llvm-commits
mailing list