Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Backend: 2 address + 17bit immediate"
2018 Mar 09
2
[SelectionDAG] [TargetOp] How to get sub-half of immediate?
Hi all,
This seems like a dumb question but while setting up a pattern in TD
file, I got stuck on trying to get each half of an immediate as the
half-sized type (ie. i64 imm -> pair of i32 imm's). Is there an existing
way to do it? I've tried the 'EXTRACT_SUBREG' but that seems to error at
the end of scheduling. Looking at Target.td, I'm not sure which opcode
is meant
2018 Mar 09
0
[SelectionDAG] [TargetOp] How to get sub-half of immediate?
Hi Kevin,
To get some portion of a constant immediate you can use SDNodeXForms to
transform constant SDNodes into other values. For a worked example, in the
MIPS backend we use this for constant synthesis by materializing the value into a
register:
(From lib/Target/MipsInstrInfo.td):
// Transformation Function - get the lower 16 bits.
def LO16 : SDNodeXForm<imm, [{
return getImm(N,
2007 Jun 14
1
[LLVMdev] Node definitions, Pseudo ops and lowering SELECT/COND_BRANCH to branch instructions
Hello,
Im back trying to finish my backend to a simple RISC cpu SABRE now
that most of the tedious process of examining undergraduate students
is out of the way. I have managed to describe the registers and the
instructions in the architecture and have added support for 32 bit
immediates (thanks to Christopher Lamb) as the instruction set only
supports 17 bit immediates directly.
Could
2007 Mar 13
0
[LLVMdev] Writing a backend basic information
Hello,
Ive started writing a backend to a simple 32bit RISC processor core with
the goal of undertaking some flexible instruction processor core research
on FPGAs and also to use it for teaching computer architecture.
I have a requirement to generate instructions like below, where the (17bit)
immediate value is (preferably) omitted if it has a zero value.
add %15, %14
add %12, %23 - 18
mov
2007 Jan 09
3
[LLVMdev] Pattern matching questions
I was able to resolve my previous question about dealing with custom
loads/stores, and following Chris' suggestion, the IBM Cell SPU backend
can generate code for "int main(void) { return 0; }" without crashing
llc. There's a lot of work still to be done... like getting frame
offsets correctly computed and hauling in the raft of intrinsics that
the Cell SDK defines.
Three quick
2015 Nov 22
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
On Sun, Nov 22, 2015 at 1:28 AM, Rui Ueyama <ruiu at google.com> wrote:
> I'm not sure if I understand the semantics of HI16 and LO16 relocations. If
> my understanding is correct, a pair of HI16 and LO16 represents an addend
> AHL. AHL is computed by (AHI<<16) | (ALO&0xFFFF). Can't we apply HI16 and
> LO16 relocations separately and produce the same relocation
2014 Aug 15
2
[LLVMdev] Help with definition of subregisters; spill, rematerialization and implicit uses
Hi,
I have a problem regarding sub-register definitions and LiveIntervals on
our target. When a subregister is defined, other parts of the register
are always left untouched - they are neither read or def:ed.
It however seems that Codegen treats subregister definitions as somehow
clobbering the whole register.
The SSA-code looks like this after isel:
(Reg0 and Reg1 are 16bit registers. Reg2,
2014 Aug 19
2
[LLVMdev] Help with definition of subregisters; spill, rematerialization and implicit uses
Hi Quentin,
On 08/15/14 19:01, Quentin Colombet wrote:
[...]
>> The question is: How should true subregister definitions be
>> expressed so that they do not interfere with each other? See the
>> detailed problem description below.
>
> We do have a limitation in our current liveness tracking for
> sub-register. Therefore, I am not sure that is possible.
>
>
2007 Jan 09
2
[LLVMdev] Pattern matching questions
On Tue, 9 Jan 2007, Evan Cheng wrote:
>> - How does one deal with multiple instruction sequences in a pattern?
>> To load a constant is a two instruction sequence, but both
>> instructions only take two operands (assume that r3 is a 32-bit
>> register):
>>
>> ilhu $3, 45 # r3 = (45 << 16)
>> iohl $3, 5 # r3 |= 5
2015 Jul 22
1
[LLVMdev] prevent an SDValue from lower into an immediate field in load
Hi there,
I am doing relocation in my backend by calling my function getAddrNonPic:
SDValue getAddrNonPIC(NodeTy *N, SDLoc DL, EVT Ty, SelectionDAG &DAG)const{
SValue Hi=getTarget(N,Ty,DAG, MyBackend::Hi16);
SValue Lo=getTarget(N,Ty,DAG, MyBackend::Lo16);
return DAG.getNode(ISD::ADD, DL, Ty,
DAG.getNode(MyBackend::Hi16, DL, Ty, Hi),
DAG.getNode(MyBackend::Lo16, DL, Ty, Ho));
}
2015 Nov 21
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
On Sat, Nov 21, 2015 at 10:08 AM, Rui Ueyama <ruiu at google.com> wrote:
> On Fri, Nov 20, 2015 at 11:02 PM, Simon Atanasyan <simon at atanasyan.com>
> wrote:
>>
>> On Sat, Nov 21, 2015 at 9:28 AM, Rui Ueyama <ruiu at google.com> wrote:
>> > On Fri, Nov 20, 2015 at 10:13 PM, Simon Atanasyan <simon at atanasyan.com>
>> > wrote:
>>
2011 May 19
3
[LLVMdev] subregisters, def-kill
Hi,
I am combining 16-bit registers to a 32 bit register in order to make a wide store, as per below:
732 %reg16506:hi16<def,dead> = COPY %reg16445<kill>;
740 %reg16506:lo16<def> = COPY %reg16468<kill>;
748 %r3<def,dead> = store %reg16506<kill>, %r3,
As you can see, LiveVariables has marked the high part dead, even though the super-register is used at
2007 Jan 09
0
[LLVMdev] Pattern matching questions
On Jan 9, 2007, at 10:01 AM, Scott Michel wrote:
> I was able to resolve my previous question about dealing with custom
> loads/stores, and following Chris' suggestion, the IBM Cell SPU
> backend
> can generate code for "int main(void) { return 0; }" without crashing
> llc. There's a lot of work still to be done... like getting frame
> offsets correctly
2011 May 19
0
[LLVMdev] subregisters, def-kill
On May 19, 2011, at 7:47 AM, Jonas Paulsson wrote:
> Hi,
>
> I am combining 16-bit registers to a 32 bit register in order to make a wide store, as per below:
>
> 732 %reg16506:hi16<def,dead> = COPY %reg16445<kill>;
> 740 %reg16506:lo16<def> = COPY %reg16468<kill>;
> 748 %r3<def,dead> = store %reg16506<kill>, %r3,
>
> As you can
2015 Nov 21
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
On Sat, Nov 21, 2015 at 9:28 AM, Rui Ueyama <ruiu at google.com> wrote:
> On Fri, Nov 20, 2015 at 10:13 PM, Simon Atanasyan <simon at atanasyan.com>
> wrote:
>>
>> In case of MIPS O32 ABI we have to find a matching R_MIPS_LO16
>> relocation to calculate R_MIPS_HI16 one because R_MIPS_HI16 uses
>> combined addend (AHI << 16) + (short)ALO where AHI is
2012 Jan 24
1
[LLVMdev] Req-sequence, partial defs
Hi,
I'm having an issue with subregisters on my target.
With a pseudo that writes to a 32 bit reg:
%vreg20<def> = toHi16_low0_pseudo %vreg2; reg32:%vreg20 hi16:%vreg2
expands to
%vreg2<def> = COPY %a2h; hi16:%vreg2
%vreg43<def> = mov 0, pred:0, pred:%noreg, %ac0<imp-use>, %ac1<imp-use>; lo16:%vreg43
%vreg20<def> =
2011 May 20
1
[LLVMdev] subregisters, def-kill
If I write
%reg16506<def> = INSERT_SUBREG %reg16506, %reg16445, hi16; #1
%reg16506<def> = INSERT_SUBREG %reg16506, %reg16468, lo16; #2
store %reg16506 #3
it will not coalesce, as
LiveVariables:
on
#2: %16506 gets #2 as a kill
#3: %16506 gets #3 as an additional kill
LiveIntervalAnalysis:
2015 Nov 21
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
Hi,
I am working on support R_MIPS_HI16 / R_MIPS_LO16 in the new LLD and
have a couple of questions.
== Q1
In case of MIPS O32 ABI we have to find a matching R_MIPS_LO16
relocation to calculate R_MIPS_HI16 one because R_MIPS_HI16 uses
combined addend (AHI << 16) + (short)ALO where AHI is original
R_MIPS_HI16 addend and ALO is addend of the matching R_MIPS_LO16
relocation [1]. There are two
2007 Jun 15
1
[LLVMdev] Node definitions, Pseudo ops and lowering SELECT/COND_BRANCH to branch instructions
Howdy,
<---stuff deleted ----->
Basically the architecture I want to compile to (SABRE) RISC does
not support a conditional branch or a select instruction. It supports
explicit branches of the form.
blt %a, %b, imm // branch on less than iff %a < %b then pc = pc + imm
So there are various branch instructions like .... ble, beq, bne,
blt, bltu and bleu (unsigned)
Im just
2010 Nov 17
1
[LLVMdev] [llvm-commits] [patch] ARM/MC/ELF add new stub for movt/movw in ARMFixupKinds
+llvmdev
-llvmcommits
On Fri, Nov 12, 2010 at 8:03 AM, Jim Grosbach <grosbach at apple.com> wrote:
> Sorta. getBinaryCodeForInst() is auto-generated by tablegen, so shouldn't be modified directly. The target can register hooks for instruction operands for any special encoding needs, including registering fixups, using the EncoderMethod string. For an example, have a look at the